<template>
	<view>
		<view>
			<view class="bg" />
			<view
				style="display: flex;position: absolute;top:0;padding: 10px 20px;box-sizing: border-box;align-items: center;">
				<view
					style="border-radius: 100px;width: 68px;height: 68px;border: 4px #5498FB solid;overflow: hidden;margin-right: 20px;">
					<image src="../../resource/index/tx.png" style="width: 68px;height: 68px;;"></image>
				</view>
				<span style="color: white;font-size: 18px;">大美汽修厂，欢迎您</span>
			</view>
			<view class="content" style="display: flex;justify-content: space-around;">
				<view style="display: flex;flex-direction: column;align-items: center;" @click="smhx()">
					<image src="../../resource/index/sm.png" style="width: 48px;height: 48px;margin-bottom: 16px;">
					</image>
					<span>扫码核销</span>
				</view>
				<view style="width: 2px;height: 80px;background-color: #00000011;"></view>
				<view style="display: flex;flex-direction: column;align-items: center;" @click="srhxm()">
					<image src="../../resource/index/sr.png" style="width: 48px;height: 48px;margin-bottom: 16px;">
					</image>
					<span>输入核销码</span>
				</view>
			</view>
			<view class="content" style="display: flex;flex-wrap: wrap;">
				<view style="display: flex;flex-direction: column;align-items: center;width: 25%;margin-bottom: 20px;"
					@click="jytj()">
					<view
						style="background: linear-gradient(to bottom right, #38D0FF, #039FFD);border-radius: 100px;width: 52px;height: 52px;text-align: center;padding: 12px 0;box-sizing: border-box;margin-bottom: 8px;">
						<image src="../../resource/index/tj.png" style="width: 28px;height: 28px;margin-bottom: 16px;">
						</image>
					</view>
					<span>经营统计</span>
				</view>
				<view style="display: flex;flex-direction: column;align-items: center;width: 25%;margin-bottom: 20px;"
					@click="hxjl()">
					<view
						style="background: linear-gradient(to bottom right, #FFB35C, #FF8941);border-radius: 100px;width: 52px;height: 52px;text-align: center;padding: 12px 0;box-sizing: border-box;margin-bottom: 8px;">
						<image src="../../resource/index/hxjl.png"
							style="width: 28px;height: 28px;margin-bottom: 16px;"></image>
					</view>
					<span>核销记录</span>
				</view>
				<view style="display: flex;flex-direction: column;align-items: center;width: 25%;margin-bottom: 20px;"
					@click="szmx()">
					<view
						style="background: linear-gradient(to bottom right, #7BB2FF, #5E95FF);border-radius: 100px;width: 52px;height: 52px;text-align: center;padding: 12px 0;box-sizing: border-box;margin-bottom: 8px;">
						<image src="../../resource/index/szmx.png"
							style="width: 28px;height: 28px;margin-bottom: 16px;"></image>
					</view>
					<span>收支明细</span>
				</view>
				<view style="display: flex;flex-direction: column;align-items: center;width: 25%;margin-bottom: 20px;"
					@click="ddgl()">
					<view
						style="background: linear-gradient(to bottom right, #FFD100, #FFA100);border-radius: 100px;width: 52px;height: 52px;text-align: center;padding: 12px 0;box-sizing: border-box;margin-bottom: 8px;">
						<image src="../../resource/index/ddgl.png"
							style="width: 28px;height: 28px;margin-bottom: 16px;"></image>
					</view>
					<span>订单管理</span>
				</view>
				<view style="display: flex;flex-direction: column;align-items: center;width: 25%;margin-bottom: 20px;"
					@click="kqgl()">
					<view
						style="background: linear-gradient(to bottom right, #7DB3FF, #4886FF);border-radius: 100px;width: 52px;height: 52px;text-align: center;padding: 12px 0;box-sizing: border-box;margin-bottom: 8px;">
						<image src="../../resource/index/kj.png" style="width: 28px;height: 28px;margin-bottom: 16px;">
						</image>
					</view>
					<span>卡券管理</span>
				</view>
				<view style="display: flex;flex-direction: column;align-items: center;width: 25%;margin-bottom: 20px;"
					@click="wxrw()">
					<view
						style="background: linear-gradient(to bottom right, #19EAC0, #00DC97);border-radius: 100px;width: 52px;height: 52px;text-align: center;padding: 12px 0;box-sizing: border-box;margin-bottom: 8px;">
						<image src="../../resource/index/wx.png" style="width: 28px;height: 28px;margin-bottom: 16px;">
						</image>
					</view>
					<span>维修任务</span>
				</view>
				<view style="display: flex;flex-direction: column;align-items: center;width: 25%;margin-bottom: 20px;"
					@click="pjgl()">
					<view
						style="background: linear-gradient(to bottom right, #FD8787, #FE5858);border-radius: 100px;width: 52px;height: 52px;text-align: center;padding: 12px 0;box-sizing: border-box;margin-bottom: 8px;">
						<image src="../../resource/index/pjgl.png"
							style="width: 28px;height: 28px;margin-bottom: 16px;"></image>
					</view>
					<span>评价管理</span>
				</view>
				<view style="display: flex;flex-direction: column;align-items: center;width: 25%;margin-bottom: 20px;"
					@click="shgl()">
					<view
						style="background: linear-gradient(to bottom right, #37CFFD, #05A2FD);border-radius: 100px;width: 52px;height: 52px;text-align: center;padding: 12px 0;box-sizing: border-box;margin-bottom: 8px;">
						<image src="../../resource/index/zlk.png" style="width: 28px;height: 28px;margin-bottom: 16px;">
						</image>
					</view>
					<span>商户资料</span>
				</view>
				<view style="display: flex;flex-direction: column;align-items: center;width: 25%;" @click="hdfb()">
					<view
						style="background: linear-gradient(to bottom right, #FFB35C, #FF8941);border-radius: 100px;width: 52px;height: 52px;text-align: center;padding: 12px 0;box-sizing: border-box;margin-bottom: 8px;">
						<image src="../../resource/index/hd.png" style="width: 28px;height: 28px;margin-bottom: 16px;">
						</image>
					</view>
					<span>活动发布</span>
				</view>

			</view>

			<view class="content" style="display: flex;justify-content: space-around;flex-direction: column;">
				<view style="align-items: center;display: flex;width: 100%;margin-bottom: 12px;">
					<image src="../../resource/index/message.png" style="width: 22px;height:22px;margin-right: 8px;">
					</image>
					<view style="margin-right: 102px;font-size: 16px;">最新通知</view>
					<view style="color: orangered;">今日上门取车任务共32单 ></view>
				</view>
				<table style="width: 100%;text-align: center;border-top:4px solid #e3e3e366;">
					<tr>
						<th>用户</th>
						<th>服务项目</th>
						<th>时间</th>
					</tr>
					<tr v-for="(item, index) in [1, 2, 3, 4]" :key="index">
						<td>张先生</td>
						<td>汽车美容、基础保养</td>
						<td>2022-03-10 12:49</td>
					</tr>
				</table>

			</view>

		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {

			}
		},
		methods: {

			getCode() {
				this.$http({
					url: '/api/auth/tocode',
					method: 'POST',
					data: {
						email: this.LoginForm.email
					},
					success: (res) => {
						if (res.data.code === 200) {
							uni.showToast({
								title: '验证码发送成功',
								icon: 'success'
							});
						} else {
							uni.showToast({
								title: res.data.message || '验证码发送失败',
								icon: 'none'
							});
						}
					},
					fail: (error) => {
						console.error('验证码接口请求出错：', error);
						uni.showToast({
							title: '网络异常，请稍后重试',
							icon: 'none'
						});
						clearInterval(this.codeTimer);
						this.isCodeBtnDisabled = false;
						this.codeBtnText = '获取验证码';
					}
				});
			},
			smhx() {
				uni.navigateTo({
					url: '/pages/index/saomahexiao/saomahexiao',
					animationType: 'pop-in',
					animationDuration: 200
				});
			},


			srhxm() {
				uni.navigateTo({
					url: '/pages/index/srhxm/srhxm',
					animationType: 'pop-in',
					animationDuration: 200
				});
			},


			jytj() {
				uni.navigateTo({
					url: '/pages/index/jingyingtongji/jingyingtongji',
					animationType: 'pop-in',
					animationDuration: 200
				});
			},

			hxjl() {
				uni.navigateTo({
					url: '/pages/index/hxjl/hxjl',
					animationType: 'pop-in',
					animationDuration: 200
				});
			},


			szmx() {

				uni.navigateTo({
					url: '/pages/index/szmx/szmx',
					animationType: 'pop-in',
					animationDuration: 200
				});
			},


			ddgl() {
				uni.navigateTo({
					url: '/pages/index/ddgl/ddgl',
					animationType: 'pop-in',
					animationDuration: 200
				});
			},
			hdfb() {
				uni.navigateTo({
					url: '/pages/hjjfabuhuodong/hjjfabuhuodong',
					animationType: 'pop-in',
					animationDuration: 200
				});
			},
			kqgl() {
				uni.navigateTo({
					url: '/pages/hjjkaquan/hjjkaquan',
					animationType: 'pop-in',
					animationDuration: 200
				});
			},
			pjgl() {
				uni.navigateTo({
					url: '/pages/hjjpingjiaguanli/hjjpingjiaguanli',
					animationType: 'pop-in',
					animationDuration: 200
				});
			},
			shgl() {
				uni.navigateTo({
					url: '/pages/hjjshanghuziliao/hjjshanghuziliao',
					animationType: 'pop-in',
					animationDuration: 200
				});
			},
			wxrw() {
				uni.navigateTo({
					url: '/pages/weixiu/weixiu',
					animationType: 'pop-in',
					animationDuration: 200
				});
			},

		}
	}
</script>

<style lang="scss" scoped>
	.bg {
		width: 100%;
		background-color: #3183FB;
		height: 172px;
	}

	.content {
		position: relative;
		top: -62px;
		left: 22.5rpx;
		border-radius: 20px;
		width: 94%;
		background-color: white;
		padding: 28px 16px;
		box-sizing: border-box;
		margin-bottom: 16px;
	}


	td {
		color: #00000088;
		font-size: 12px;
		border-bottom: 1px #e3e3e3 solid;
	}

	tr {

		height: 32px;
		padding: 2px 0;
		box-sizing: border-box;
	}
</style>